package com.tyijian.admin.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.tyijian.admin.entity.SysTeam;
import com.tyijian.admin.repository.jpa.TeamDao;

/**
 * 分组
 * @author yangjp
 *
 */
@Component
@Transactional
public class TeamService {
	
	
	@Autowired
	private TeamDao teamDao;
	
	public List<SysTeam> findAll(){
		return (List<SysTeam>) teamDao.findAll();
	}
	
	public SysTeam get(Long id){
		return teamDao.findOne(id);
	}
	
	public void update(SysTeam team){
		teamDao.save(team);
	}
	
	public void save(SysTeam team){
		teamDao.save(team);
	}
	
	
	public void delete(SysTeam team){
		teamDao.delete(team);
	}
}
